import javax.sound.midi.MidiFileFormat;

public class HashBuck {
    static class Node{
        public int key;
        public int val;
        public Node next;

        public Node(int key, int val) {
            this.key = key;
            this.val = val;
        }
       
    } public Node[] array;
    public int usedsize;
    public double load_factor;
    public HashBuck(){
array=new Node[10];
    }
    public void put(int key,int val){
        int index=key%array.length;
        Node cur=array[index];
        while(cur!=null){
            if (cur.key==key){
                key=cur.key;
                return;
            }
            cur=cur.next;
        }
        Node node=new Node(key,val);
        node.next=array[index];
        array[index]=node;
        usedsize++;
        if (doFactor(>=load_factor){
            grow();
        }
    }

    private void grow() {
    }

    private double doFactor() {
  return usedsize*1.0/array.length;
    }
}
